package example.lec02;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class Student extends Person{

    private List<String> courses;
    private Map<String, Integer> scores;
    private Properties health;
    private Book[] books;
    private Set<String> hobbies;

    public Student()
    {
        System.out.println("spring 实例化主调bean:Student.");
    }
    public String toString()
    {

        System.out.println(courses);
        System.out.println(scores);
        System.out.println(health);
        //System.out.println("books::"+books);
        for(Book book:this.books)
        {
            System.out.println(book.toString());
        }
        System.out.println(hobbies);
        return "toString test method.";
    }
    public void setCourses(List<String> course)
    {
        this.courses = course;
    }

    public void setScores(Map<String, Integer> scores)
    {
        this.scores = scores;
    }
    public void setHealth(Properties health)
    {
        this.health = health;
    }

    public void setBooks(Book[] books)
    {
        this.books = books;
    }

    public void setHobbies(Set<String> hobbies)
    {
        this.hobbies = hobbies;
    }

}
